<?php

function genLink()
{
        $list = scandir('../malllink');
        $list = array_diff($list, array('.', '..'));
        $file = '../malllink/' . $list[array_rand($list)];
        $mall = file_get_contents($file);    
    return $mall;
}

$link = genLink();
$link = trim($link);
$link = iconv( "UTF-8", "gb2312//IGNORE" , $link);
return $link;
?>